package com.hgxd.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 变量报警记录
 * </p>
 *
 * @author fsd
 * @since 2023-10-18
 */
@Getter
@Setter
@TableName("rb_variate_alarm")
@ApiModel(value = "VariateAlarm对象", description = "变量报警记录")
public class VariateAlarm implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("报警记录id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("变量id")
    private Integer variateId;

    @ApiModelProperty("变量名称")
    private String variateName;

    @ApiModelProperty("当前值")
    private Double nowValue;

    @ApiModelProperty("报警阈值")
    private String thresholdValue;

    @ApiModelProperty("报警时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime alarmTime;

    @ApiModelProperty("报警状态：1:报警，2:未报警")
    private Integer alarmState;

    @ApiModelProperty("处理状态：1:已处理，2:未处理")
    private Integer processState;

    @ApiModelProperty("所属从机ID")
    private Integer slaveId;

    @ApiModelProperty("所属从机名称")
    private String slaveName;

    @ApiModelProperty("所属设备ID")
    private Integer equipmentId;

    @ApiModelProperty("所属设备名称")
    private String equipmentName;


}
